<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Cms管理</title>
    <link rel="stylesheet" href="./static/css/web.css"/>
    <link rel="stylesheet" href="./static/css/payment.css">
    <link rel="stylesheet" href="./static/bootstrap/css/bootstrap.css">
</head>
<body style="background: #e7e8eb;">
<div id="app" v-cloak>
    <div class="mainHeaderBox">
        <div class="mainHeaderBoxContent">
            <div class="mainHeaderBoxContentLog" @click="toPage('../main.html')">
                <!--<img src="../img/logo.png">
                <span>仁众智慧餐饮云平台</span>-->
                <img src="https://www.yqsh.cn/img/logo.png" id="show_logo">
                <span id="show_name">微信体验学校</span>
            </div>
            <div class="mainHeaderBoxContentMenus">
                <!--
                    作者：303740339@qq.com
                    时间：2019-02-13
                    描述：<div class="mainHeaderBoxContentMenu mainHeaderBoxContentMenuActive">
                -->
                <a class="mainHeaderBoxContentMenu" href="../contacts.html">
                    通讯录
                </a>
                <a class="mainHeaderBoxContentMenu mainHeaderBoxContentMenuActive" href="../workbench.html">
                    工作台
                </a>
                <a class="mainHeaderBoxContentMenu" href="../incrementService.html">
                    增值服务
                </a>
                <a class="mainHeaderBoxContentMenu" href="../html/dataCenter/index.html">
                    消费数据
                </a>
                <a class="mainHeaderBoxContentMenu" href="../consum.html">
                    数据总览
                </a>
                <a class="mainHeaderBoxContentMenu" href="../setting.html">
                    设置
                </a>
            </div>
            <div class="exit" onclick="logout()">
                退出
            </div>
        </div>
    </div>
    <div class="mainContentBox w1200 auto-height">
        <div class="contact-home-box">
            <div class="left-panel">
                <ul class="main-menu-nav" style="margin: 20px 0;">
                    <li class="menu-two" :class="{'hover':item.url && window.location.href.indexOf(item.url)>=0}"
                        v-for="item in menus">
                        <a :href="item.url"><span>{{item.title}}</span></a>
                    </li>
                </ul>
            </div>
            <div class="right-panel">
                <div style="margin: 20px;min-height:550px;">
                    <div class="header-title dline">
                        <h3>站点信息</h3>
                        <p>请填写网站站点的信息</p>
                    </div>
                    <div style="margin:30px 0;">
                        <form>
                            <div class="form-group">
                                <label>网站名称：</label>
                                <input type="text" v-model="info.siteName" placeholder="请输入网站名称" class="form-control"
                                       style="width:300px;">
                            </div>
                            <div class="form-group">
                                <label>域名：</label>
                                <input type="text" v-model="info.siteDomain" placeholder="请输入域名" class="form-control"
                                       style="width:500px;">
                            </div>
                            <div class="form-group">
                                <label>端口：</label>
                                <input type="text" v-model="info.sitePort" placeholder="请输入端口" class="form-control"
                                       style="width:100px;">
                            </div>
                            <div class="form-group">
                                <label>网址：</label>
                                <input type="text" v-model="info.siteWebPath" placeholder="请输入网址" class="form-control"
                                       style="width:300px;">
                            </div>


                            <div style="margin:30px 0;">
                                <button type="button" class="btn btn-primary" @click="saveData">提交</button>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="footerBox">
        <div class="footerBoxContent">
            Copyright Notice：@2020 YQSH. All Rights Reserved | ICP：蜀ICP备19024447号-1
        </div>
    </div>
</div>
</body>

</html>
<script type="text/javascript" src="./static/js/vue.min.js"></script>
<script type="text/javascript" src="./static/js/vue-resource.min.js"></script>
<script type="text/javascript" src="./static/js/utils.js"></script>
<script type="text/javascript" src="./static/js/jquery.js"></script>
<script type="text/javascript" src="./static/js/layer/layer.js"></script>
<script src="https://cdn.bootcdn.net/ajax/libs/axios/0.19.2/axios.min.js"></script>
<script src="https://cdn.bootcdn.net/ajax/libs/qs/6.9.4/qs.min.js"></script>
<script type="text/javascript">
    new Vue({
        el: '#app',
        data: {
            info: {}
        },
        methods: {

            loadData: function (id) {
                let _this = this;

                if (id) {
                    post("/cms/site/get/" + id, function (result) {

                        _this.info = result.data;
                    })
                }
            },
            saveData: function () {
                let _this = this;

                postWithData("/cms/site/save", _this.info, function (result) {
                    showMessage("保存完成.");

                    setTimeout(function () {
                        history.back();
                    }, 1000)
                })
            }
        },
        mounted: function () {
            this.loadData(getQueryParam("id"));
        }
    });
</script>